package ribbon;

import com.netflix.loadbalancer.IRule;
import com.ygl.consumer.lb.NacosSameClusterWeightRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author yanggld
 * @Date 2020/12/20-15:43
 */
@Configuration
public class RibbonConfiguration {
//    @Bean
//    public IRule ribbonRule() {
//        return new RandomRule();
//    }

    @Bean
    public IRule myRule(){
//        return new NacosWeightLoadBalancerRule();
        return new NacosSameClusterWeightRule();
    }

}
